<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'estagiario.label', default: 'Estagiario')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="cabelistlateral"><img src="${resource(dir:'images',file:'seta_cabecalho_20x20.png')}" /> Meus dados</div><br/>
        <inc:include url="/includes/inc_estagiario_menu.gsp" />
        <div class="body">
            <div class="dialog dadospessoais">
              <g:if test="${flash.message}">
                  <div class="message">${flash.message}</div>
              </g:if>
              <g:hasErrors bean="${estagiarioInstance}">
              <div class="errors erro">
                  <g:renderErrors bean="${estagiarioInstance}" as="list" />
              </div>
              </g:hasErrors>
              <form method="post" action="/EstagioWeb/estagiario/update">
                  <g:hiddenField name="id" value="${estagiarioInstance?.id}" />
                  <g:hiddenField name="version" value="${estagiarioInstance?.version}" />
                    <table>
                        <tbody>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="nome"><g:message code="estagiario.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" size="50" maxlength="100" value="${estagiarioInstance?.nome}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="username"><g:message code="estagiario.username.label" default="Username" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'username', 'errors')}">
                                    <g:textField name="username" maxlength="60" value="${estagiarioInstance?.username}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="password"><g:message code="estagiario.password.label" default="Password" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'password', 'errors')}">
                                    <g:passwordField name="password" value="${estagiarioInstance?.password}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="banco"><g:message code="estagiario.banco.label" default="Banco" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'banco', 'errors')}">
                                    <g:textField name="banco" value="${estagiarioInstance?.banco}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="ag"><g:message code="estagiario.ag.label" default="Agência" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'ag', 'errors')}">
                                    <g:textField name="ag" value="${estagiarioInstance?.ag}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="cc"><g:message code="estagiario.cc.label" default="Conta Corrente" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'cc', 'errors')}">
                                    <g:textField name="cc" value="${estagiarioInstance?.cc}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="cpf"><g:message code="estagiario.cpf.label" default="CPF" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'cpf', 'errors')}">
                                    <g:textField name="cpf" maxlength="11" value="${estagiarioInstance?.cpf}" />
                                </td>
                            </tr>

                             <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="rg"><g:message code="estagiario.rg.label" default="RG" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'rg', 'errors')}">
                                    <g:textField name="rg" maxlength="15" value="${estagiarioInstance?.rg}" />
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="sexo"><g:message code="estagiario.sexo.label" default="Sexo" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'sexo', 'errors')}">
                                    <select name="sexo">
                                      <option value="M" <%if(estagiarioInstance?.sexo == "M"){%>selected<%}%>>Masculino</option>
                                      <option value="F" <%if(estagiarioInstance?.sexo == "F"){%>selected<%}%>>Feminino</option>
                                    </select>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="habilitacao"><g:message code="estagiario.habilitacao.label" default="Habilitação" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'habilitacao', 'errors')}">
                                    <select name="habilitacao">
                                        <option value="0" <%if(estagiarioInstance?.habilitacao == "0"){%>selected<%}%>>Não</option>
                                        <option value="1" <%if(estagiarioInstance?.habilitacao == "1"){%>selected<%}%>>Sim</option>
                                    </select>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="categoria"><g:message code="estagiario.categoria.label" default="Categoria" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'categoria', 'errors')}">
                                    <select name="categoria">
                                        <option value="A" <%if(estagiarioInstance?.categoria == "A"){%>selected<%}%>>A</option>
                                        <option value="B" <%if(estagiarioInstance?.categoria == "B"){%>selected<%}%>>B</option>
                                        <option value="AB" <%if(estagiarioInstance?.categoria == "AB"){%>selected<%}%>>AB</option>
                                        <option value="AC" <%if(estagiarioInstance?.categoria == "AC"){%>selected<%}%>>AC</option>
                                        <option value="D" <%if(estagiarioInstance?.categoria == "D"){%>selected<%}%>>D</option>
                                    </select>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="dtNascimento"><g:message code="estagiario.dtNascimento.label" default="Data Nascimento" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'dtNascimento', 'errors')}">
                                    <g:datePicker name="dtNascimento" precision="day" value="${estagiarioInstance?.dtNascimento}" years="${2050..1950}" default="none" noSelection="['': '']" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="filhos"><g:message code="estagiario.filhos.label" default="Filhos" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'filhos', 'errors')}">
                                    <g:textField name="filhos" value="${fieldValue(bean: estagiarioInstance, field: 'filhos')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="estadoCivil"><g:message code="estagiario.estadoCivil.label" default="Estado Civil" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'estadoCivil', 'errors')}">
                                    <select name="estadoCivil">
                                        <option value="Casado" <%if(estagiarioInstance?.estadoCivil == "Casado"){%>selected<%}%>>Casado</option>
                                        <option value="Solteiro" <%if(estagiarioInstance?.estadoCivil == "Solteiro"){%>selected<%}%>>Solteiro</option>
                                        <option value="Separado" <%if(estagiarioInstance?.estadoCivil == "Separado"){%>selected<%}%>>Separado</option>
                                        <option value="Divorciado" <%if(estagiarioInstance?.estadoCivil == "Divorciado"){%>selected<%}%>>Divorciado</option>
                                    </select>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="infoCompl"><g:message code="estagiario.infoCompl.label" default="Informações Complementares" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'infoCompl', 'errors')}">
                                    <g:textArea name="infoCompl" cols="40" rows="5" value="${estagiarioInstance?.infoCompl}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="pretSalarial"><g:message code="estagiario.pretSalarial.label" default="Pretenção Salarial" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'pretSalarial', 'errors')}">
                                    <g:textField name="pretSalarial" value="${fieldValue(bean: estagiarioInstance, field: 'pretSalarial')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="pne"><g:message code="estagiario.pne.label" default="Portador de Deficiência" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'pne', 'errors')}">
                                    <select name="pne">
                                        <option value="0" <%if(estagiarioInstance?.habilitacao == "0"){%>selected<%}%>>Não</option>
                                        <option value="1" <%if(estagiarioInstance?.habilitacao == "1"){%>selected<%}%>>Sim</option>
                                    </select>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="pneDescr"><g:message code="estagiario.pneDescr.label" default="Deficiência Descrição" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: estagiarioInstance, field: 'pneDescr', 'errors')}">
                                    <g:textArea name="pneDescr" cols="40" rows="5" value="${estagiarioInstance?.pneDescr}" />
                                </td>
                            </tr>
                            <tr>
                              <td></td>
                              <td class="btsalvarcadastro">
                                  <g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Delete')}" />
                              </td>
                            </tr>
                        </tbody>
                    </table>
                </form>
              </div>

              <div class="dadoslateral">
                  <g:include view="includes/inc_endereco.gsp" />
              </div>
          
              <div class="dadoslateral">
                  <g:include view="includes/inc_contato.gsp" />
              </div>
        </div>
    </body>
</html>
